<div class="container">
    <div class="block">

    </div>
</div>

<style>
    * {
        margin: 0;
        padding: 0;
    }

    .container {
        width: 600px;
        height: 550px;
        position: relative;
    }

    .block {
        width: 100px;
        height: 50px;
        background: green;
        position: absolute;
        animation: anim 5s ease infinite;
    }

    @keyframes anim {
        0% {
            top: 0;
            left: 0;
        }
        25% {
            top: 0;
            left: 500px;
        }
        50% {
            top: 500px;
            left: 500px;
        }
        75% {
            top: 500px;
            left: 0;
        }
        100% {
            top: 0;
            left: 0;
        }
    }
</style>
